//
//  SpecialDeatialsTableViewCell.m
//  GiftItems
//
//  Created by lanou3g on 15/9/21.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "SpecialDeatialsTableViewCell.h"

@implementation SpecialDeatialsTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.SpecialImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10,10, kWidth - 20, 150)];
        self.SpecialImageView.backgroundColor = [UIColor orangeColor];
        
        self.SpecialImageView.layer.masksToBounds = YES;
        self.SpecialImageView.layer.cornerRadius = 5;
        
        [self.contentView addSubview:self.SpecialImageView];
        
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 140, kWidth - 40, 16)];
        self.titleLabel.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.1];
        [self.contentView addSubview:self.titleLabel];
        
        self.selectionStyle = NO;

    }
    
    return self;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



- (void)shareModel:(SpecialDeatilsModel *)model {
    
    self.titleLabel.text = model.title;
    self.titleLabel.textColor = [UIColor whiteColor];
    
    [self.SpecialImageView sd_setImageWithURL:[NSURL URLWithString:model.cover_image_url] placeholderImage:[UIImage imageNamed:@"11"]];
    
}


@end
